#!/bin/bash
# $Id

. /etc/scripts/env
. /etc/scripts/common.fn
. /etc/scripts/vault.fn



date "+%s" > /var/tmp/aasp_timer
while true; do
				if [ /var/tmp/aasp_timer ]; then
					t1=$(</var/tmp/aasp_timer)
					t2=$(date "+%s")
					if [ "$(($t1 + 240))" -lt "$t2" -a "$(<$commit_disks_switch_running)" = "0" ]; then
						_warn_msg "Deleting vault password... timer expired after 240 seconds."
						rm -f $vp_pass
						__sane_kdir	
						exit 0
					fi
				fi
				sleep 10
done

# vim: ts=2 syn=sh
# aasp_mon.sh: end
